<?php
/**
* @software         [JiJinCMS]
* @author           [上海集锦信息科技有限公司]
* @website          [http://www.jijinweb.com]
* @email            [sunny@jijinweb.com]
**/
namespace app\admin\validate;
use think\validate;
use think\facade\Request;
class UserValidate extends validate {
    public $rule = [
        'username'  => ['require', 'length' => '4,25', 'unique'=>"user"],
        'password'  => ['require', 'length' => '6,50'],
        'repassword'  => ['require', 'confirm' => 'password'],
    ];

    protected $message = [
        'username.require'=>'用户名必须填写',
        'username.length'=>'用户名长度需要在4-25字符之间',
        'username.unique'=>'用户名已存在',
        'password.require'=>'密码必须填写',
        'password.length'=>'密码长度需要在6位以上',   
        'repassword.require'=>'确认密码必须填写',
        'repassword.confirm'=>'确认密码不正确',
    ];    
    protected $scene = [
        'updatePass'  =>  ['password','repassword'],
    ];           
}

